Skip to content

Modernize project#23

Merged
lord63 merged 2 commits intodevfrom
migrate-ci-uv
Mar 21, 2026
Merged

Modernize project#23
lord63 merged 2 commits intodevfrom
migrate-ci-uv

Conversation

@lord63
Copy link
Copy Markdown
Owner

@lord63 lord63 commented Mar 21, 2026

  1. migrate ci to github action;
  2. migrate to use uv;
  3. drop 2.x, support 3.10+

Copilot AI review requested due to automatic review settings March 21, 2026 09:36
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Modernizes the project’s packaging, dependency management, and CI by migrating from legacy setup.py/tox/Travis to pyproject.toml + uv and GitHub Actions, while raising the supported Python baseline to 3.10+.

Changes:

  • Add pyproject.toml (hatchling build) and uv.lock for uv-managed dependency locking.
  • Replace Travis CI with a GitHub Actions workflow that runs pytest on Python 3.10–3.13.
  • Remove legacy packaging/testing configs (setup.py, setup.cfg, tox.ini, dev-requirements.txt, .travis.yml).

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
uv.lock Introduces uv lockfile to make dependency installs reproducible.
pyproject.toml Defines project metadata, Python requirement (3.10+), hatchling build config, and dev dependency group.
pyspin/spin.py Removes Python 2 compatibility shims and simplifies text handling for Python 3-only support.
.github/workflows/ci.yml New CI workflow using uv to install deps and run pytest across supported Python versions.
tox.ini Removed legacy tox configuration.
setup.py Removed legacy setuptools packaging script.
setup.cfg Removed wheel universal config (no longer relevant with Python 3.10+).
dev-requirements.txt Removed legacy dev requirements file.
.travis.yml Removed Travis CI configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


- name: Install dependencies
run: uv sync --dev

Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI no longer runs the style/PEP8 checks that were previously executed via py.test --pep8 (pytest-pep8). If style checking is still desired, add an explicit lint step/job (e.g., ruff/pycodestyle/flake8) so formatting regressions are caught in CI.

Suggested change
- name: Lint
run: uv run ruff check .

Copilot uses AI. Check for mistakes.
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: uv sync --dev
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uv sync --dev in CI should run in a lockfile-enforcing mode so the workflow fails if uv.lock is out of date, rather than implicitly resolving/updating dependencies during the run. Consider using uv sync --frozen (or the equivalent locked/frozen option) to guarantee reproducible CI installs.

Suggested change
run: uv sync --dev
run: uv sync --dev --frozen

Copilot uses AI. Check for mistakes.
pyproject.toml Outdated
]

[project.urls]
Homepage = "http://github.com/lord63/py-spin"
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Project URL uses http:// for GitHub. Switching to https:// avoids unnecessary redirects and prevents mixed-content issues when rendered in some contexts.

Suggested change
Homepage = "http://github.com/lord63/py-spin"
Homepage = "https://github.com/lord63/py-spin"

Copilot uses AI. Check for mistakes.
pyspin/spin.py Outdated

def _spin_cursor(self):
print(text_type("\r{0} {1}").format(self.next(), self.words), end="")
print(str("\r{0} {1}").format(self.next(), self.words), end="")
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant str(...) wrapping around an already-string format literal adds noise without changing behavior. This can be simplified by formatting the string directly.

Suggested change
print(str("\r{0} {1}").format(self.next(), self.words), end="")
print("\r{0} {1}".format(self.next(), self.words), end="")

Copilot uses AI. Check for mistakes.
@lord63
Copy link
Copy Markdown
Owner Author

lord63 commented Mar 21, 2026

@copilot apply changes based on the comments in this thread, and directly push commit to this pr .

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 21, 2026

@lord63 I've opened a new pull request, #24, to work on those changes. Once the pull request is ready, I'll request review from you.

@lord63 lord63 merged commit 3d54390 into dev Mar 21, 2026
4 checks passed
@lord63 lord63 deleted the migrate-ci-uv branch March 21, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants